Data compression is used for reducing the cost of storing large data files on computers, as well as reducing the time for transmitting large data files between computers. In the so-called “transform methods” data is transformed into coefficients that represent the data in a frequency domain. Coefficients may be quantized (lossy compression) without significantly affecting the quality of data that is reconstructed from the quantized coefficients. Redundancy in the coefficients may then be reduced or eliminated without affecting quality of the reconstructed data (lossless compression).
One class of transforms is the discrete cosine transform. The DCT puts most of the image information in a small number of coefficients. The majority of the coefficients can be quantized to smaller bit sizes in order to gain compression.
The DCT is fast to calculate. However, performing lossless compression on the DCT coefficients can be expensive and complex.